package com.harvey.serwant;

import com.harvey.service.MyService;

import java.util.ServiceLoader;

/**
 * @author harvey
 * @Description
 * @date 2020-03-27 11:23
 * @since
 */

public class ServiceInvoker {


    public static void main(String[] args) {

        ServiceLoader<MyService> serviceLoader = ServiceLoader.load(MyService.class);

        for (MyService myService : serviceLoader) {
            myService.show();
        }


    }

}
